package com.kevin.designpattern.chain_responsibility;

public class Client {

    public static void main(String[] args) {

        // 创建请假条
        LeaveRequest leaveRequest = new LeaveRequest("kevin", 5, "身体不适");

        // 创建各级领导
        GroupLeader groupLeader = new GroupLeader();
        ManagerLeader managerLeader = new ManagerLeader();
        GeneralManager generalManager = new GeneralManager();

        // 设置处理者链
        groupLeader.setNextHandler(managerLeader);
        managerLeader.setNextHandler(generalManager);

        groupLeader.submit(leaveRequest);
    }
}
